<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex align-stretch benben-position-layout flex myMoney_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex align-center justify-between flex-sub myMoney_fd0_0'      >
            <view   class='flex align-center myMoney_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  myMoney_fd0_0_c0_c0'  >&#xE794;</text>
</view>
    <view   class='flex align-center'      >
        <text class='myMoney_fd0_0_c1_c0'  >我的钱包</text>
</view>
    <view   class='flex align-center justify-end myMoney_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/bindAccount/bindAccount`"   >
        <text class='myMoney_fd0_0_c2_c0'  >绑定账户</text>
</view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myMoney_flex_1"    >
            <view   class='flex flex-direction flex-wrap align-stretch myMoney_fd1_0'      >
            <view   class='flex flex-wrap align-center justify-between myMoney_fd1_0_c0'      >
            <view   class='flex flex-direction flex-wrap align-stretch'      >
        <text class='myMoney_fd1_0_c0_c0_c0'  >{{moneyData.store_money}}</text>
<text class='myMoney_fd1_0_c0_c0_c1'  >可提现收益（元）</text>
</view>
<button class='myMoney_fd1_0_c0_c1'  @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/immediateWithdrawal/immediateWithdrawal?type=2`"  >提现</button>
</view>
    <view   class='flex flex-wrap align-center'      >
            <view   class='flex flex-direction flex-wrap align-stretch myMoney_fd1_0_c1_c0'      >
        <text class='myMoney_fd1_0_c0_c0_c0'  >{{moneyData.this_month_money}}</text>
<text class='myMoney_fd1_0_c1_c0_c1'  >本月收益（元）</text>
</view>
    <view   class='flex flex-direction flex-wrap align-stretch'      >
        <text class='myMoney_fd1_0_c0_c0_c0'  >{{moneyData.last_month_money}}</text>
<text class='myMoney_fd1_0_c1_c0_c1'  >上月收益（元）</text>
</view>
</view>
</view>
</view>
        
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center myMoney_flex_2"    >
        <text class='myMoney_fd2_0'  >近30天记录</text>
<text class='myMoney_fd2_1'     @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/balanceDetail/balanceDetail`" >查看全部</text>
</view>
        
<!---flex布局flex布局结束-->
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myMoney_flex_3"    >
            <template v-for = '(item,key0) in detailList'>
    <view   class='flex flex-wrap align-center myMoney_fd3_0'       :key='key0'>
            <view   class='flex flex-direction flex-wrap align-stretch flex-sub myMoney_fd3_0_c0'      >
        <text class='myMoney_fd3_0_c0_c0'  >{{item.remark}}</text>
<text class='myMoney_fd3_0_c0_c1'  >{{item.create_time}}</text>
</view>
<text class='myMoney_fd3_0_c1'   v-if= " item.money_type=='1'">
    <text >{{ item.change_money | frontPrice }}</text>
    <text >{{ item.change_money | laterPrice }}</text>
</text><text class='myMoney_fd3_0_c1_1'   v-if= " item.money_type=='2'">
    <text >{{ item.change_money | frontPrice }}</text>
    <text >{{ item.change_money | laterPrice }}</text>
</text>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
        
<!---flex布局flex布局结束-->
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"moneyData":{"total_income":"","income_withdrawed":"","income_withdrawing":"","store_money":"","total_joinfee":"","total_joindeposit":"","freeze_money":"","this_month_money":"","last_month_money":""},"detailList":[],"shopID":uni.getStorageSync('shopID') || ''};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            this.getMoneyFunc()
this.getDetailFunc()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
                                    this.shopID = uni.getStorageSync('shopID') || ''
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取钱包
                async getMoneyFunc(){
                        //请求方法
    //数据验证
    
  let datamoneyData = await this.$api.post(global.apiUrls.post644b3ae43785a, {
    usermerchant_id:this.shopID
  });
  
  if (datamoneyData.data.code != 1) {
    this.$message.info(datamoneyData.data.msg);
    return
  } 
  let infomoneyData = datamoneyData.data;
  this.moneyData = infomoneyData.data
  
                },
                //获取明细信息
                 getDetailFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post644b5e0ce64bb;
                this.pageingListApiMethod = 'post';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {money_type:'0',shopID:this.shopID}
                this.listData = [];
                this.detailList = this.listData;
                this.pagingListToggle();
                
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                }
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:url(image-path('47.png')) no-repeat ,rgba(247, 247, 247, 1);background-size: 100% auto;
        }
    .myMoney_flex_0{
        background:url(image-path('47.png')) no-repeat ,transparent;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .myMoney_fd0_0_c2_c0{
        font-size:28rpx;font-weight:500;line-height:40rpx;color:#FFFFFF;
    }
    .myMoney_fd0_0_c1_c0{
        font-size:36rpx;font-weight:500;color:#fff;
    }
    .myMoney_fd0_0_c0_c0{
        font-size:32rpx;font-weight:500;color:#fff;
    }
    .myMoney_fd0_0_c0{
        width:180rpx;height:88rpx;
    }
    .myMoney_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;height:88rpx;
    }
    .myMoney_flex_1{
        padding:40rpx 24rpx 0rpx 24rpx;
    }
    .myMoney_fd1_0_c1_c0_c1{
        color:#999999;font-size:24rpx;font-weight:400;line-height:33rpx;margin:24rpx 0rpx 0rpx 0rpx;
    }
    .myMoney_fd1_0_c1_c0{
        margin:0rpx 150rpx 0rpx 0rpx;
    }
    .myMoney_fd1_0_c0_c1{
        background:#E31D1A;border-radius:80rpx 80rpx 80rpx 80rpx;font-size:28rpx;color:#fff;width:160rpx;height:66rpx;line-height:66rpx;font-weight:400;
    }
    .myMoney_fd1_0_c0_c0_c1{
        color:#999999;font-size:24rpx;font-weight:400;line-height:33rpx;margin:16rpx 0rpx 0rpx 0rpx;
    }
    .myMoney_fd1_0_c0_c0_c0{
        color:#E31D1A;font-size:48rpx;font-weight:700;line-height:57rpx;
    }
    .myMoney_fd1_0_c0{
        margin:0rpx 0rpx 40rpx 0rpx;
    }
    .myMoney_fd1_0{
        background:rgba(255, 255, 255, 1);border-radius:16rpx 16rpx 16rpx 16rpx;box-shadow:0rpx 3rpx 20rpx rgba(0, 0, 0, 0.06);padding:48rpx 32rpx 46rpx 32rpx;
    }
    .myMoney_flex_2{
        padding:40rpx 24rpx 32rpx 24rpx;
    }
    .myMoney_fd2_1{
        color:#999999;font-size:24rpx;font-weight:400;margin:0rpx 12rpx 0rpx 0rpx;
    }
    .myMoney_fd2_0{
        color:#333333;font-size:32rpx;font-weight:700;line-height:45rpx;margin:0rpx auto 0rpx 14rpx;
    }
    .myMoney_flex_3{
        padding:0rpx 32rpx 0rpx 32rpx;
    }
    .myMoney_fd3_0_c1_1{
        color:rgba(51, 51, 51, 1);font-weight:500;line-height:45rpx;font-size:32rpx;
    }
    .myMoney_fd3_0_c1{
        color:#E31D1A;font-weight:500;line-height:45rpx;font-size:32rpx;
    }
    .myMoney_fd3_0_c0_c1{
        color:#BFBFBF;font-size:24rpx;font-weight:400;line-height:33rpx;
    }
    .myMoney_fd3_0_c0_c0{
        color:#333333;font-size:28rpx;font-weight:400;line-height:40rpx;margin:0rpx 0rpx 8rpx 0rpx;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;
    }
    .myMoney_fd3_0_c0{
        margin:0rpx 24rpx 0rpx 0rpx;
    }
    .myMoney_fd3_0{
        background:#fff;padding:32rpx 32rpx 24rpx 32rpx;background-size:100% auto !important;border-radius:16rpx 16rpx 16rpx 16rpx;margin:0rpx 0rpx 24rpx 0rpx;
    }
</style>